package com.gitee.ywj1352.design.masterWorker;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author: yangwenjie.a
 * @date: 2021/6/22 10:44
 * @description:
 */
public class MyWorker extends Worker {

    public static final Logger LOGGER = LoggerFactory.getLogger(MyWorker.class);

    @Override
    public Object handle(Task input) {
        LOGGER.info("threadName={}|task={}",Thread.currentThread().getName() , input.toString());
        try {
            Thread.sleep(50);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return input.getTaskId();
    }
}
